<?php
/**
 * Local variables
 * @var \Phalcon\Mvc\View\Engine $this
 * @var string $directory
 */
?>

<h1 class="page-header">Create Controller</h1>

<div class="row">
    <div class="col-md-12">
        <?php echo $this->getContent() ?>
    </div>
</div>

<div class="row">
    <div class="col-sm-8">
        <div class="row">
            <form class="form-horizontal" autocomplete="off" method="post" action="<?php echo $this->url->get("webtools.php?_url=/controllers/create") ?>">
                <div class="form-group">
                    <label for="name" class="col-sm-4 control-label">Controller name</label>
                    <div class="col-sm-8">
                        <?php echo $this->tag->textField(array('name', 'placeholder' => 'Class name', 'class' => 'form-control', 'id' => 'name')) ?>
                    </div>
                </div>

                <div class="form-group">
                    <label for="namespace" class="col-sm-4 control-label">Namespace</label>
                    <div class="col-sm-8">
                        <?php echo $this->tag->textField(array('namespace', 'placeholder' => 'eg. My\Awesome\Namespace', 'class' => 'form-control', 'id' => 'namespace')) ?>
                    </div>
                </div>

                <div class="form-group">
                    <label for="baseClass" class="col-sm-4 control-label">Base class</label>
                    <div class="col-sm-8">
                        <?php echo $this->tag->textField(array('baseClass', 'placeholder' => 'eg. BaseController', 'class' => 'form-control', 'id' => 'baseClass')) ?>
                    </div>
                </div>

                <div class="form-group">
                    <label for="directory" class="col-sm-4 control-label">Project Root</label>
                    <div class="col-sm-8">
                        <?php echo $this->tag->textField(array('directory', 'placeholder' => 'Absolute path to the project', 'value' => $directory, 'class' => 'form-control', 'id' => 'directory')) ?>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-offset-4 col-sm-8">
                        <div class="checkbox">
                            <label for="force">
                                <?php echo $this->tag->checkField(array('force', 'id' => 'force', 'value' => 1)) ?> Force
                            </label>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-offset-4 col-sm-8 text-right">
                        <button type="submit" class="btn btn-primary">Generate</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
